<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('收入类合同列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>合同类型：</label>
                                <input type="text" name="contractTypeName"/>
                            </li>
                            <li>
                                <label>签订年份：</label>
                                <input type="text" name="signYear"/>
                            </li>
                            <li>
                                <label>合同编号：</label>
                                <input type="text" name="contractIncomeCode"/>
                            </li>
                            <li>
                                <label>合同名称：</label>
                                <input type="text" name="contractIncomeName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('credit:contractIncome:edit')}]];
        var removeFlag = [[${@permission.hasPermi('credit:contractIncome:remove')}]];
        var contractTypeNameDatas = [[${@dict.getType('contract_type')}]];
        var contractCategoryDatas = [[${@dict.getType('contract_category')}]];
        var contractIncomeConferModeDatas = [[${@dict.getType('zc_mode')}]];
        var contractIncomeStatusDatas = [[${@dict.getType('contract_status')}]];
        var prefix = ctx + "credit/contractIncome";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "收入类合同",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                clickToSelect: true,
                rememberSelected: true,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'contractIncomeUid',
                    title: '合同主键',
                    visible: false
                },
                {
                    field: 'signYear',
                    title: '签订年份'
                },
                {
                    field: 'contractIncomeCode',
                    title: '合同编号'
                },
                {
                    field: 'contractIncomeName',
                    title: '合同名称'
                },
                {
                    field: 'customerNames',
                    title: '客户名称'
                }
                ]
            };
            $.table.init(options);
        });

        /* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
        function getSelections() {
            return $.table.selectFirstColumns();
            // return $.table.selectColumns();
        }
    </script>
</body>
</html>
